Skip to content

fix: add parameters option for shape parameter optimization#142

Merged
jobo322 merged 4 commits into
mainfrom
add-parameter-option-and-fix-fitting
May 6, 2026
Merged

fix: add parameters option for shape parameter optimization#142
jobo322 merged 4 commits into
mainfrom
add-parameter-option-and-fix-fitting

Conversation

@jobo322

@jobo322 jobo322 commented May 5, 2026

Copy link
Copy Markdown
Member

remove baseline option because it was removed from ml-spectra-fitting

it fix the ticket related with shape parameters optimization when the shape.kind is lorentzian by scaling internally the y data by max absolute value to 1.

@codecov

codecov Bot commented May 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.51%. Comparing base (3f0a28d) to head (ddcd082).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #142   +/-   ##
=======================================
  Coverage   95.51%   95.51%           
=======================================
  Files          17       17           
  Lines         379      379           
  Branches      128      128           
=======================================
  Hits          362      362           
  Misses         17       17           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the peak optimization wrapper to align with ml-spectra-fitting v6 by removing the no-longer-supported baseline option and introducing a new parameters option to allow per-parameter optimization configuration.

Changes:

  • Upgrade ml-spectra-fitting to ^6.0.1 and remove the deprecated baseline option from the public optimization API.
  • Add a new parameters option (typed from ml-spectra-fitting) and forward it into the underlying optimize call.
  • Update the optimization log expectations in tests and add .yalc to lint/git ignore lists.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
vitest.config.ts Removes snapshot formatting overrides from Vitest configuration.
src/post/optimizePeaksWithLogs.ts Drops baseline forwarding and forwards new parameters option into ml-spectra-fitting optimize call.
src/post/optimizePeaks.ts Removes baseline from OptimizePeaksOptions and documents/adds parameters typing.
src/post/__tests__/optimizePeaksWithLogs.test.ts Updates expected optimizer log values for the new ml-spectra-fitting behavior.
package.json Bumps ml-spectra-fitting dependency to v6.
eslint.config.js / .gitignore Ignores .yalc artifacts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/post/optimizePeaksWithLogs.ts
Comment thread src/post/__tests__/optimizePeaksWithLogs.test.ts Outdated
@jobo322 jobo322 requested a review from targos May 5, 2026 14:58
@jobo322 jobo322 linked an issue May 5, 2026 that may be closed by this pull request
@targos

targos commented May 6, 2026

Copy link
Copy Markdown
Member

Your commit message is wrong for the breaking change. If the title is not the breaking change, you should remove the ! and use BREAKING CHANGE: explanation in the body.

@targos targos closed this May 6, 2026
@targos targos reopened this May 6, 2026
Comment thread vitest.config.ts
@jobo322 jobo322 changed the title fix!: add parameters option for shape parameter optimization fix: add parameters option for shape parameter optimization May 6, 2026
@jobo322 jobo322 merged commit 42eaf55 into main May 6, 2026
10 checks passed
@jobo322 jobo322 deleted the add-parameter-option-and-fix-fitting branch May 6, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

possible bug in optimization step if the shape is a Lorentzian

3 participants